/*
 * nextr.c (part of p8.c)
 *  
 *
 *  Created by Shang-Ju Chen on 3/5/11.
 *  midfied by sukhbir on 3/6/11
 *
 */

int
nextr( void )
{
	int r;
	
	for(r=0; rbu[r]!='\0'; r++)
	{
		
	}
	
	if(5 < r)
	{
		bug = 4;
		return (0);
	}
	else{
		rbu[r] = (char)1;
		return(r);
	}
}
